using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter22
{
	/// <summary>
	/// Example04: The Steam Engine
	/// A steam engine has a boiler that operates at 500 K. The 
	/// energy from the burning fuel changes water to steam, and
	/// this steam then drives a piston. The cold reservoir's
	/// temperature is that of the outside air, approximately
	/// 300 K. What is the maximum thermal efficiency of this
	/// steam engine?
	/// e = 0.4
	/// </summary>
	public class Example04
	{
		public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Temperature Ti = new L.Temperature();
			Ti.K = 500.0;
			L.Temperature Tf = new L.Temperature();
			Tf.K = 300.0;
			double e = 1.0 - Tf.K/Ti.K;
			result+=Convert.ToString(e)+"\r\n";
		}
	}
}
